package cn.edu.xjtu.data_structure.experiment.ex_2;

/**
 * @author yjq
 * @version 1.0
 * @date 2021/11/5 20:49
 */
public class test {
   public static void te1(String[]test){
       for (int i = 0; i <test.length ; i++) {
           for (int j = 0; j < test.length-1-i; j++) {
               if (test[j].compareTo(test[j+1])<0){
                   String temp = test[j];
                   test[j]=test[j+1];
                   test[j+1]=temp;
               }
           }
       }
    }

    public static void main(String[] args) {
        String test[]={"avcsa","Axs","vbsd","bs","B","avcsaasd"};
        te1(test);
        for (int i = 0; i < test.length; i++) {
            System.out.println(test[i]+" ");
        }
    }
}
